import actionTypes from './actionTypes'
import { ClassName } from '../api/index'
//actionCreator自己dispatch出去
export const getData = () =>{
  return (dispatch)=>{
    ClassName().then(res => {
      const data = res.data;
      dispatch({
        type:actionTypes.INIT_DATA,
        data
      })
    })
  }
}
